Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix docker deployment and hot reloading issues #356

Closed
wants to merge 10 commits into from

Conversation

00Chaotic
Copy link
Collaborator

This change adds configurations to allow hot reloading when using docker. It also downgrades the mini_racer gem, which was causing docker build failures. This will obviously incur tech debt, as the gem should be updated at some point in the future and any resulting problems with docker should be fixed.

@cassar
Copy link
Contributor

cassar commented Jun 20, 2022

This will obviously incur tech debt, as the gem should be updated at some point in the future and any resulting problems with docker should be fixed.

Yeah not ideal, any idea why the most up to date version breaks the build?

@00Chaotic
Copy link
Collaborator Author

This will obviously incur tech debt, as the gem should be updated at some point in the future and any resulting problems with docker should be fixed.

Yeah not ideal, any idea why the most up to date version breaks the build?

It works fine with the gemfile.lock changes. Seems I had those in local too but they didn't show up at the time. Not too sure about why it doesn't work with the latest version, the error below is what happens when I try using > instead of < in the gemfile to get it to use the latest version:

#9 126.8 Fetching mini_racer 0.6.2 (was 0.4.0)
#9 126.8 Installing mini_racer 0.6.2 (was 0.4.0) with native extensions
#9 128.3 Gem::Ext::BuildError: ERROR: Failed to build gem native extension.
#9 128.3
#9 128.3 current directory:
#9 128.3 /usr/local/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension
#9 128.3 /usr/local/bin/ruby -I /usr/local/lib/ruby/2.7.0 -r
#9 128.3 ./siteconf20220620-7-1rvyfrz.rb extconf.rb
#9 128.3 checking for -lpthread... yes
#9 128.3 creating Makefile
#9 128.3
#9 128.3 current directory:
#9 128.3 /usr/local/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension
#9 128.3 make "DESTDIR=" clean
#9 128.3
#9 128.3 current directory:
#9 128.3 /usr/local/bundle/gems/mini_racer-0.6.2/ext/mini_racer_extension
#9 128.3 make "DESTDIR="
#9 128.3 compiling mini_racer_extension.cc
#9 128.3 linking shared-object mini_racer_extension.so
#9 128.3 g++: error:
#9 128.3 /usr/local/bundle/gems/libv8-node-16.10.0.0-x86_64-linux-musl/vendor/v8/x86_64-linux/libv8/obj/libv8_monolith.a:
#9 128.3 No such file or directory
#9 128.3 make: *** [Makefile:262: mini_racer_extension.so] Error 1
#9 128.3
#9 128.3 make failed, exit code 2
#9 128.3
#9 128.3 Gem files will remain installed in /usr/local/bundle/gems/mini_racer-0.6.2 for
#9 128.3 inspection.
#9 128.3 Results logged to
#9 128.3 /usr/local/bundle/extensions/x86_64-linux/2.7.0/mini_racer-0.6.2/gem_make.out
#9 128.3
#9 128.3 An error occurred while installing mini_racer (0.6.2), and Bundler cannot
#9 128.3 continue.
#9 128.3 Make sure that `gem install mini_racer -v '0.6.2' --source
#9 128.3 'https://rubygems.org/'` succeeds before bundling.
#9 128.3
#9 128.3 In Gemfile:
#9 128.3   mini_racer
------
executor failed running [/bin/sh -c bundle install]: exit code: 5
ERROR: Service 'hackerspace3' failed to build : Build failed

There are some threads on it like this one which suggest uninstalling libv8-node and then trying to reinstall (or bundle?) mini_racer, but I'm not familiar with most of what is said so I'm not really in a position to try those fixes.

@00Chaotic
Copy link
Collaborator Author

These changes are now redundant, as updating the Ruby version fixed the relevant issue. There are some changes needed, but they will be raised in another PR.

@00Chaotic 00Chaotic closed this Jun 25, 2022
@00Chaotic 00Chaotic deleted the fix-docker-deployment-and-hot-reloading-issues branch June 25, 2022 06:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants